import { createApp } from 'vue';
import { StartupService } from '@cmss/config-loader';

import App from './App.vue';
import router from './router';
import store from './store';
import { vantPlugins } from './plugins/vant';
import Bmob, { globalPlugins } from './plugins/global';
import './assets/style/reset.scss';
import './assets/style/global.less';
const app = createApp(App);
app.config.globalProperties.$bmob = Bmob;

StartupService.loadRootConfig(`./config/root.config.json`)
  .then(() => {
    // httpInterceptor();
    // return init();
  })
  .then(() => {
    app
      .use(store)
      .use(router)
      .use(globalPlugins)
      .use(vantPlugins)
      .mount('#app');
  });
